package com.tgy.studentmanagement.ecxeptionHandel;

/***
 * @ClassName: GlobalException
 * @Description:
 * @Auther: tanggy3
 * @Date: 17:07 2023/4/12
 * @version : V1.0
 */
public class GlobalException extends RuntimeException{
    private static final long serialVersionUID = -3421551827383250295L;
    private BasicErrorType basicErrorType;

    private String message;

    public GlobalException(BasicErrorType basicErrorType) {
        this.basicErrorType = basicErrorType;
        this.message = basicErrorType.getMsg();
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public BasicErrorType getBasicErrorType() {
        return basicErrorType;
    }

    public void setBasicErrorType(BasicErrorType basicErrorType) {
        this.basicErrorType = basicErrorType;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

